from django.shortcuts import render
from rest_framework.views import APIView
from myapp.models import User
from myapp.myser import UserSer
from rest_framework.response import Response
# Create your views here.

class UserView(APIView):
    def get(self,request):
        username = request.GET.get('username',None)
        password = request.GET.get('password',None)
        user = User(username=username,password=password)
        user.save()

        return Response({'msg':'注册成功'})
